<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width,height=device-height,inital-scale=1,maximum-scale=1.0,user-scalable=no">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="format-detection" content="telephone=no"/>
    <meta name="format-detection" content="email=no"/>
    <title>信用卡</title>
    <link type="text/css" rel="stylesheet" href="css/common.css">
    <link type="text/css" rel="stylesheet" href="css/bank_card.css">
</head>
<body>

<div class="main">
</div>

</body>
<script type="text/javascript" src="js/jquery-3.2.1.js"></script>
<script type="text/javascript" src="js/common.js"></script>
<script>
    /**
     * 获取信用卡列表
     */
    var id = getQueryString("id");
    $.ajax({
        url: 'https://wallet.seshell.cn/api/Credit/getCreditList',
        type: 'POST',
        data: {creditType: 0},
        dataType: "json",
        success: function (data) {
            var str = "";
            for (var i = 0; i < data.data.length; i++) {
                var arr = [];
                var creditTag ="";
                arr = data.data[i].creditTag.split(",");
                for(var n = 0 ;n < arr.length;n++){
                    creditTag += "<span>"+arr[n]+"</span>"
                }
                str += "<div class='bank_card'><a ><ul><li><img src='"+data.data[i].imgUrl+"'></li></ul><ul><li class='bank_card_name'>"+data.data[i].title+"</li><li>"+data.data[i].remark+"</li><li>"+creditTag+"</li></ul></a></div>"
            }
            $('.main').html(str);
            $('.bank_card a').click(function () {
                var index = $(this).parent(".bank_card").index();
                var jumpLink = encodeURIComponent(data.data[index].jumpLink);
                var bankName = $(this).find(".bank_card_name").html();
                window.location.href = "https://wap.seshell.cn/bank_card_application.html?id=" +  + "&bankName=" + bankName+"&jumpLink="+ jumpLink
            })
        }
    });


</script>
</html>